/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package psexecute.MailClasses;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

/**
 *
 * @author Giuseppe
 */
public class Autenticazione extends Authenticator {

    private String username;
    private String pwd;

    public Autenticazione(String usr, String pwd)
    {
        this.username = usr;
        this.pwd = pwd;
    }

    @Override
    public PasswordAuthentication getPasswordAuthentication()
    {
        return new PasswordAuthentication(this.username,this.pwd);
    }

}
